d338aa5049600d29c0784f5b9cda06ad1cc7626b,src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java,BeanDeserializer,deserializeWithUnwrapped,#JsonParser#DeserializationContext#Object#,656
Before Change
continue;
}
// but... others should be passed to unwrapped property deserializers
tokens.writeFieldName(propName);
tokens.copyCurrentStructure(p);
// how about any setter? We'll get copies but...
if (_anySetter != null) {
_anySetter.deserializeAndSet(p, ctxt, bean, propName);
}
}
After Change
// both to any setter AND buffer... but, for now, the only thing
// we can do.
// how about any setter? We'll get copies but...
if (_anySetter == null) {
// but... others should be passed to unwrapped property deserializers
tokens.writeFieldName(propName);
tokens.copyCurrentStructure(p);
} else {
// Need to copy to a separate buffer first
TokenBuffer b2 = new TokenBuffer(p, ctxt);
b2.copyCurrentStructure(p);
tokens.writeFieldName(propName);
tokens.append(b2);
try {
JsonParser p2 = b2.asParser(p);
p2.nextToken();
_anySetter.deserializeAndSet(p2, ctxt, bean, propName);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
continue;
}
}
tokens.writeEndObject();
_unwrappedPropertyHandler.processUnwrapped(p, ctxt, bean, tokens);